import pytest,requests
import allure
base_url = "http://8.140.193.160:8899"

@allure.story("登录")
def test_login():
    with allure.step("发起登录请求"):
        response = requests.post(base_url + "/adminapi/login",json = {"account":"admin","pwd":"920509","imgcode":"a"})
    with allure.step("断言响应状态码"):
        assert response.status_code==200
    with allure.step("断言响应内容msg"):
        assert response.json()['msg'] == 'ok'



























